package com.aruba.paging3application.bindingAdapter

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.aruba.paging3application.R
import com.squareup.picasso.Picasso

/**
 * Created by aruba on 2021/9/22.
 */
@BindingAdapter("image")
fun setImage(imageView: ImageView, imageUrl: String) {
    Picasso.get().load(imageUrl).placeholder(R.drawable.ic_launcher_foreground)
        .error(R.drawable.ic_launcher_foreground)
        .into(imageView);
}